<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/myblog/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/myblog/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/myblog/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/myblog/images/logo.svg" color="#222">

<link rel="stylesheet" href="/myblog/css/main.css">



<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css" integrity="sha256-mUZM63G8m73Mcidfrv5E+Y61y7a12O5mW4ezU3bxqW4=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"gitee.com","root":"/myblog/","images":"/myblog/images","scheme":"Gemini","darkmode":false,"version":"8.8.0","exturl":false,"sidebar":{"position":"left","display":"always","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/myblog/js/config.js"></script>
<meta name="description" content="安装软件需要安装的软件有git、typora、node.js、cnpm，网上教程比较多，安装过程没有遇到问题，不做介绍。 安装hexo博客环境12345678# 在cmd上或terminal执行下面命令cnpm install -g hexo-cli# 安装完成后,查看hexo的版本hexo -v# 构建自己的博客环境，进入博客文件夹hexo init# 本地运行博客，地址localhost:40">
<meta property="og:type" content="article">
<meta property="og:title" content="本博客参考内容">
<meta property="og:url" content="https://gitee.com/cmygis/2021/10/31/%E6%9C%AC%E5%8D%9A%E5%AE%A2%E5%8F%82%E8%80%83%E5%86%85%E5%AE%B9/index.html">
<meta property="og:site_name" content="矿小测的博客">
<meta property="og:description" content="安装软件需要安装的软件有git、typora、node.js、cnpm，网上教程比较多，安装过程没有遇到问题，不做介绍。 安装hexo博客环境12345678# 在cmd上或terminal执行下面命令cnpm install -g hexo-cli# 安装完成后,查看hexo的版本hexo -v# 构建自己的博客环境，进入博客文件夹hexo init# 本地运行博客，地址localhost:40">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-10-31T13:28:16.000Z">
<meta property="article:modified_time" content="2021-10-31T14:16:02.654Z">
<meta property="article:author" content="矿小测">
<meta property="article:tag" content="经验">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="https://gitee.com/cmygis/2021/10/31/%E6%9C%AC%E5%8D%9A%E5%AE%A2%E5%8F%82%E8%80%83%E5%86%85%E5%AE%B9/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://gitee.com/cmygis/2021/10/31/%E6%9C%AC%E5%8D%9A%E5%AE%A2%E5%8F%82%E8%80%83%E5%86%85%E5%AE%B9/","path":"2021/10/31/本博客参考内容/","title":"本博客参考内容"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>本博客参考内容 | 矿小测的博客</title>
  




  <noscript>
    <link rel="stylesheet" href="/myblog/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/myblog/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">矿小测的博客</h1>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu">
        <li class="menu-item menu-item-home"><a href="/myblog/" rel="section"><i class="home                          //首页 fa-fw"></i>首页</a></li>
        <li class="menu-item menu-item-archives"><a href="/myblog/archives/" rel="section"><i class="archive          //归档 fa-fw"></i>归档</a></li>
        <li class="menu-item menu-item-categories"><a href="/myblog/categories/" rel="section"><i class="th           //分类 fa-fw"></i>分类</a></li>
        <li class="menu-item menu-item-tags"><a href="/myblog/tags/" rel="section"><i class="tags                     //标签 fa-fw"></i>标签</a></li>
        <li class="menu-item menu-item-about"><a href="/myblog/about/" rel="section"><i class="user                   //关于 fa-fw"></i>关于</a></li>
  </ul>
</nav>




</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85%E8%BD%AF%E4%BB%B6"><span class="nav-number">1.</span> <span class="nav-text">安装软件</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85hexo%E5%8D%9A%E5%AE%A2%E7%8E%AF%E5%A2%83"><span class="nav-number">2.</span> <span class="nav-text">安装hexo博客环境</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#hexo%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4"><span class="nav-number">3.</span> <span class="nav-text">hexo常用命令</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BD%BF%E7%94%A8gitee%E6%89%98%E7%AE%A1%E5%8D%9A%E5%AE%A2"><span class="nav-number">4.</span> <span class="nav-text">使用gitee托管博客</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%83%A8%E7%BD%B2%E5%88%B0%E8%BF%9C%E7%AB%AF"><span class="nav-number">5.</span> <span class="nav-text">部署到远端</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#hexo%E4%B8%AD%E6%96%87%E9%85%8D%E7%BD%AE"><span class="nav-number">6.</span> <span class="nav-text">hexo中文配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99"><span class="nav-number">7.</span> <span class="nav-text">参考资料</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">矿小测</p>
  <div class="site-description" itemprop="description">live and love</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/myblog/archives/">
          <span class="site-state-item-count">4</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/myblog/categories/">
        <span class="site-state-item-count">1</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/myblog/tags/">
        <span class="site-state-item-count">2</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://gitee.com/cmygis/2021/10/31/%E6%9C%AC%E5%8D%9A%E5%AE%A2%E5%8F%82%E8%80%83%E5%86%85%E5%AE%B9/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/myblog/images/avatar.gif">
      <meta itemprop="name" content="矿小测">
      <meta itemprop="description" content="live and love">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="矿小测的博客">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          本博客参考内容
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>
      

      <time title="创建时间：2021-10-31 21:28:16 / 修改时间：22:16:02" itemprop="dateCreated datePublished" datetime="2021-10-31T21:28:16+08:00">2021-10-31</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/myblog/categories/%E6%97%A5%E5%B8%B8/" itemprop="url" rel="index"><span itemprop="name">日常</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <h2 id="安装软件"><a href="#安装软件" class="headerlink" title="安装软件"></a>安装软件</h2><p>需要安装的软件有git、typora、node.js、cnpm，网上教程比较多，安装过程没有遇到问题，不做介绍。</p>
<h2 id="安装hexo博客环境"><a href="#安装hexo博客环境" class="headerlink" title="安装hexo博客环境"></a>安装hexo博客环境</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> 在cmd上或terminal执行下面命令</span></span><br><span class="line">cnpm install -g hexo-cli</span><br><span class="line"><span class="meta">#</span><span class="bash"> 安装完成后,查看hexo的版本</span></span><br><span class="line">hexo -v</span><br><span class="line"><span class="meta">#</span><span class="bash"> 构建自己的博客环境，进入博客文件夹</span></span><br><span class="line">hexo init</span><br><span class="line"><span class="meta">#</span><span class="bash"> 本地运行博客，地址localhost:4000</span></span><br><span class="line">hexo s</span><br></pre></td></tr></table></figure>

<h2 id="hexo常用命令"><a href="#hexo常用命令" class="headerlink" title="hexo常用命令"></a>hexo常用命令</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> 本地启动博客</span></span><br><span class="line">hexo s</span><br><span class="line"><span class="meta">#</span><span class="bash"> 新建博客文章，在<span class="built_in">source</span>/_posts文件夹</span></span><br><span class="line">hexo new &#x27;标题&#x27;</span><br><span class="line"><span class="meta">#</span><span class="bash"> 清除博客缓存</span></span><br><span class="line">hexo clean</span><br><span class="line"><span class="meta">#</span><span class="bash"> 将md文件生成静态页面</span></span><br><span class="line">hexo g</span><br></pre></td></tr></table></figure>

<h2 id="使用gitee托管博客"><a href="#使用gitee托管博客" class="headerlink" title="使用gitee托管博客"></a>使用gitee托管博客</h2><p>github国内访问速度不佳，故使用gitee pages发布博客</p>
<p>gitee pages现在需要上传身份证审核个人身份，一天即可审核通过。</p>
<ol>
<li><p>注册码云gitee账户</p>
</li>
<li><p>新建仓库</p>
</li>
<li><p>安装git插件</p>
</li>
</ol>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cnpm install --save hexo-deployer-git</span><br></pre></td></tr></table></figure>

<ol start="4">
<li>本地配置远程仓库</li>
</ol>
<p>需要设置gitee仓库的名称和仓库地址</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">url:</span> <span class="string">https://gitee.com/cmygis</span></span><br><span class="line"><span class="attr">root:</span> <span class="string">/myblog/</span></span><br><span class="line"><span class="comment"># ---------------------------------</span></span><br><span class="line"><span class="attr">deploy:</span></span><br><span class="line">  <span class="attr">type:</span> <span class="string">git</span></span><br><span class="line">  <span class="attr">repo:</span> <span class="string">https://gitee.com/cmygis/myblog</span> <span class="comment">#仓库地址</span></span><br><span class="line">  <span class="attr">branch:</span> <span class="string">master</span> <span class="comment">#仓库分支</span></span><br></pre></td></tr></table></figure>

<blockquote>
<p>hexo的配置文件有两个，一个是位于博客根目录的_config.yml，另一个是位于themes文件夹下对于主题目录下的——config.yml，是设置hexo主题的选项。</p>
</blockquote>
<h2 id="部署到远端"><a href="#部署到远端" class="headerlink" title="部署到远端"></a>部署到远端</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo d</span><br></pre></td></tr></table></figure>

<h2 id="hexo中文配置"><a href="#hexo中文配置" class="headerlink" title="hexo中文配置"></a>hexo中文配置</h2><p>修改博客文件夹下的_config.yml 的language :zh-CN</p>
<h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h2><ol>
<li><a target="_blank" rel="noopener" href="https://www.jianshu.com/p/3a05351a37dc">Hexo的Next主题详细配置</a></li>
<li><a target="_blank" rel="noopener" href="https://blog.csdn.net/qq_46036214/article/details/110137239">在Gitee搭建属于自己的博客_jiuqi_玖柒的博客-CSDN博客</a></li>
<li><a target="_blank" rel="noopener" href="https://blog.csdn.net/mqdxiaoxiao/article/details/93644533">Hexo博客NexT主题下添加分类、标签、关于菜单项_野猿新一-CSDN博客</a></li>
<li><a target="_blank" rel="noopener" href="https://hsinjhao.github.io/2019/05/16/BuildBlogsBasedOnHexoAndGithub/">利用hexo和github搭建个人博客的辛酸之路 | HsinJhao’s Blogs</a></li>
</ol>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/myblog/tags/%E7%BB%8F%E9%AA%8C/" rel="tag"># 经验</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/myblog/2021/10/26/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/" rel="prev" title="并发编程">
                  <i class="fa fa-chevron-left"></i> 并发编程
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/myblog/2021/10/31/%E6%94%B6%E8%97%8F%E7%9A%84%E7%AB%99%E7%82%B9/" rel="next" title="收藏的站点">
                  收藏的站点 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">矿小测</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/myblog/js/comments.js"></script><script src="/myblog/js/utils.js"></script><script src="/myblog/js/motion.js"></script><script src="/myblog/js/next-boot.js"></script>

  





  





</body>
</html>
